﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DPS.Prototype.Policy;
using DPS.Prototype.PolicyBase;
using DPS.Prototype.Extension;

namespace DPS.Prototype.Model
{
    [Inspect]
    public class Submission
    {
        [Inspect(OrderNo=3)]
        public SubmitResult Result { get; private set; }

        [Inspect(OrderNo = 2)]
        public int CycleNo { get; private set; }

        [Inspect(OrderNo=1)]
        internal string ProdCompetitorName
        {
            get { return this.ProdCompetitor.CompetitorName; }
        }

        public bool AbandonThisCycle { get; set; }

        public ProdCompetitorBase ProdCompetitor { get; private set; }

        public Submission(SubmitResult result, ProdCompetitorBase prodCompetitor, int cycleNo)
        {
            this.Result = result;
            this.ProdCompetitor = prodCompetitor;
            this.CycleNo = cycleNo;
            this.AbandonThisCycle = false;
        }

        public Submission(bool abandonThisCycle, ProdCompetitorBase prodCompetitor, int cycleNo)
        {
            this.Result = null;
            this.ProdCompetitor = prodCompetitor;
            this.CycleNo = cycleNo;
            this.AbandonThisCycle = abandonThisCycle;
        }

    }
}